{% extends 'web/base.html' %}
{% load staticfiles %}

<!--{% block manifest %} appcache/channellist.appcache {% endblock %}-->
{% block base_title %} 推广列表 {% endblock %}

{% block base_body %}
{% verbatim %}


<div class="list_con scroll" id="channelList">
    <div v-if="loading"></div>
    <div v-else class="load_fix" style="background:none;">
        <div class="zuan_center">
            <div class="ui active centered inline loader red" style="top: 50%;transform: scale(.6)"></div>
        </div>
    </div>

    <div class="ui list" style="width: 50%;float: left;">
    <div class="item">
        昵称
    </div>
    <div class="item" v-for="use in user">
        <span v-if="use.U_Name==''||use.U_Name==null">无昵称</span>
        <span v-else v-html="use.U_Name"></span>
    </div>
</div>
<div class="ui list" style="width: 50%;float: left; ">
    <div class="item">
        手机号
    </div>
    <div class="item" v-for="use in user">
        <span v-html="use.U_Tel"></span>
    </div>
</div>
</div>
{% endverbatim %}
{% endblock %}

{% block base_script %}
    var channelList = new Vue({
        el:'#channelList',
        data:{
            user:[],
            loading: false,
        },
        methods:{
            getYong:function(){
                var self = this;
                reqwest({
                    url:'http://api.zgtxcj.com/mobile/userrecommend/',
                    method:'get',
                    type:'json',
                    data:{
                        uid:localStorage.getItem('uid')
                    },
                    success:function(resp){
                        self.user=resp;
                        self.loading = true;
                    }
                })
            },
            run: function(){
                this.getYong()
            }
        },
    })
{% endblock %}
{% block base_run %}channelList{% endblock %}